<?php
class NewDailyTaskVo extends SzAbstractMySqlVo
{

    private $userId;
    private $taskId;
    private $number;
    private $maxNum;
    private $status;
    private $receiveStatus;

    /**
     * Initialize NewDailyTaskVo.
     *
     * @param $userId
     * @param $taskId
     * @param $number
     * @param $maxNum
     * @param $status
     * @param $receiveStatus
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return NewDailyTaskVo
     */
    public function __construct($userId, $taskId, $number, $maxNum, $status, $receiveStatus, $isInsert = false) {
        $this->userId = $userId;
        $this->taskId = $taskId;
        $this->number = $number;
        $this->maxNum = $maxNum;
        $this->status = $status;
        $this->receiveStatus = $receiveStatus;

        $this->isInsert = $isInsert;
        $this->voClassName = 'NewDailyTaskVo';
        $this->ormName = 'NewDailyTask';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'taskId' => $this->getTaskId(),
            'number' => $this->getNumber(),
            'maxNum' => $this->getMaxNum(),
            'status' => $this->getStatus(),
            'receiveStatus' => $this->getReceiveStatus(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'taskId' => $this->getTaskId(),
            'number' => $this->getNumber(),
            'maxNum' => $this->getMaxNum(),
            'status' => $this->getStatus(),
            'receiveStatus' => $this->getReceiveStatus(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getTaskId(),
            $this->getNumber(),
            $this->getMaxNum(),
            $this->getStatus(),
            $this->getReceiveStatus(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getTaskId()
    {
        return $this->taskId;
    }

    public function setTaskId($val)
    {
        $this->saveColumnStatus(1, $this->taskId);
        $this->taskId = $val;
    }

    public function getNumber()
    {
        return $this->number;
    }

    public function setNumber($val)
    {
        $this->saveColumnStatus(2, $this->number);
        $this->number = $val;
    }

    public function getMaxNum()
    {
        return $this->maxNum;
    }

    public function setMaxNum($val)
    {
        $this->saveColumnStatus(3, $this->maxNum);
        $this->maxNum = $val;
    }

    public function getStatus()
    {
        return $this->status;
    }

    public function setStatus($val)
    {
        $this->saveColumnStatus(4, $this->status);
        $this->status = $val;
    }

    public function getReceiveStatus()
    {
        return $this->receiveStatus;
    }

    public function setReceiveStatus($val)
    {
        $this->saveColumnStatus(5, $this->receiveStatus);
        $this->receiveStatus = $val;
    }

    public function updateNumber($val)
    {
        $this->saveColumnStatus(2, $this->number);
        $this->number += $val;
    }

}